pub fn dp_rec_mc(amount: u32) -> u32 {
    let arr: [u32; 8] = [1, 2, 5, 10, 20, 30, 50, 100];

    let mut res: Vec<u32> = vec![u32::MAX; (amount + 1) as usize];
    res[0] = 0;

    for i in 1..=amount {
        for &coin in arr.iter() {
            if coin <= i {
                res[i as usize] = std::cmp::min(res[i as usize], res[(i - coin) as usize] + 1);
            }
        }
    }

    if res[amount as usize] == u32::MAX {
        return 0;
    }

    res[amount as usize]
}
